package com.itheima.redbaby.engine.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.itheima.redbaby.ContantValue;
import com.itheima.redbaby.bean.Product;
import com.itheima.redbaby.engine.BaseEngine;
import com.itheima.redbaby.engine.LimitBuyEngine;

public class LimitBuyEngineImpl extends BaseEngine implements LimitBuyEngine {

	@Override
	public List<Product> geLimitBuyPList() {

		// 获得服务器返回的 json 对象

		JSONObject json = getJson(TYPE_GET,
				ContantValue.REDBOY_LIMITBUYSERVLERT, null);

		List<Product> topicList = JSONObject.parseArray(
				json.getString("productlist"), Product.class);

		return topicList;
	}

}
